package com.zhongke.cotrun.model.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

@ApiModel(value = "专家基本信息表单")
@Data
public class ExpertInfo {

    @NotNull(message = "id不能为空", groups = {UserValidator.UpDate.class})
    @ApiModelProperty(value = "id号（修改时候必填）", example = "123")
    private Integer expertId;//id号

    @ApiModelProperty(value = "研究领域 （修改和注册时候必填）")
    @NotNull(message = "研究领域不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String researchArea;//研究领域

    @ApiModelProperty(value = "研究方向多个用,隔开（修改和注册时候必填）")
    //@NotNull(message = "研究方向多个用不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String research;//研究方向多个用|

    @ApiModelProperty(value = "职称（修改和注册时候必填）")
    @NotNull(message = "职称不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String jobTitle;//职物

    @NotNull(message = "最高职称不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    @ApiModelProperty(value = "最高职称（修改和注册时候必填）")
    private String topTitle;//最高职称

    @ApiModelProperty(value = "获取职称时间（修改和注册时候必填）")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "获取职称时间不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Date getTime;//获取职称时间

    @ApiModelProperty(value = "职称证明（修改和注册时候必填暂时不需要填）")
    @NotNull(message = "职称证明不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String titleCertificate;//职称证明

    @ApiModelProperty(value = "职业资格（修改和注册时候必填）暂时删掉")
    @NotNull(message = "职业资格不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String ncp;//职业资格

    @ApiModelProperty(value = "获取职业资格时间（修改和注册时候必填）暂时删掉")
    @NotNull(message = "获取职业资格时间不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date getNcp;//获取职业资格时间

    @ApiModelProperty(value = "资格证明材料（修改和注册时候必填）暂时删掉")
    @NotNull(message = "资格证明材料不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String ncpAddress;//资格证明材料

    @ApiModelProperty(value = "头像（修改和注册时候必填）")
//    @NotNull(message = "头像不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String headPortrait;//头像

    @ApiModelProperty(value = "个人简介（修改和注册时候必填）")
    @NotNull(message = "个人简介不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String individual;//个人简介

    @ApiModelProperty(value = "是否公开0公开 1非（修改和注册时候必填）", example = "1")
    @NotNull(message = "是否公开不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private short showPublic;//是否公开0公开 1非

    @ApiModelProperty(value = "是否全名 0全名 1非全名（修改和注册时候必填）", example = "1")
    @NotNull(message = "是否全名不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private short fullName;//是否全名 0全名 1非全名

    @ApiModelProperty(value = "关联用户账户（注册时候必填）", example = "12")
    @NotNull(message = "关联用户账户不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer linkUserId;//关联用户账户

    @ApiModelProperty(value = "专家链接（修改和注册时候必填）")
    @NotNull(message = "专家链接不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String expertLink;//专家链接

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;

    @ApiModelProperty(value = "审核状态 0:待审核,1:审核通过,2审核驳回",example = "0")
    private Short auditStatus;

    @ApiModelProperty(value = "审核人员")
    private String auditUser;

    @ApiModelProperty(value = "审批意见")
    private String auditOpinion;

    @ApiModelProperty(value = "状态 0:正常 1:删除/注销 2:禁用", example = "1")
    private Short state;//状态 0:正常 1:删除/注销 2:禁用

    @ApiModelProperty(value = "备注")
    private String remark;//备注

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;//创建时间

    @ApiModelProperty(value = "最后更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;//最后更新时间

    @ApiModelProperty(value = "关键词",hidden = true)
    private String keyWord;//关键词（数据库没有字段）

    private int recommended;//是否推荐0 正常   1推荐

    private UserInfo userInfo;//关联的用户

}
